package cn.waqwb.s03;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Classname SubSchool
 * @Description TODO
 * @Date 2022/9/15 19:46
 * @Created by Administrator
 */
@Component("schoolSub")
public class SubSchool extends School{
    @Value("清华附小")
    private String name;
    @Value("海淀")
    private String address;

    public SubSchool(){
        System.out.println("这是SubSchool子类的构造方法");
    }

    @Override
    public String toString() {
        return "SubSchool{" +
                "name='" + name + '\'' +
                ", address='" + address + '\'' +
                '}';
    }
}
